1. Field of the Invention
The present invention relates to a machining-error correcting method used for a non-circular shape machining apparatus such as a numerical control lathe or a numerical control grinding machine which machines a product having a non-circular-shaped section by turning or grinding a rotating workpiece.
2. Description of the Prior Art
In recent years, machining apparatuses for machining a non-circular shape such as a cam have become popular. FIG. 1 is a block diagram showing an example a numerical control lathe for machining a non-circular shape workpiece, in which a workpiece 3 is rotated at a fixed relation speed by a spindle motor 5, which rotation is detected by a pulse generator 6. On the basis of a value detected by the pulse generator 6, an X-axis servo mechanism 2 which is synchronous with the rotation of the workpiece 3, is controlled by a control apparatus 1. A drive of an X-axis driving motor 7 enables a tool rest 9 to be moved forward/backward and the workpiece 3 is machined by a tool 10 mounted on the tool rest 9. A drive of a Z-axis motor 12 is controlled by a Z-axis servo mechanism 11 to move the tool rest 9 sideways. In such a numerical control lathe for machining the non-circular shape workpiece, in order to form an intended shape by moving the cutting tool forward/backward, synchronously with the rotation of the workpiece 3, the cutting tool moves at a very high speed in comparison with usual turning, and the servo device therefore can not follow-up the command value and further a machining error occurs. As a method of correcting the machining error, a method of learning which repeats an operation of correcting a command value on the basis of an occurred error is utilized.
FIG. 2 is a block diagram showing a detailed example of a drive controlling section in the X-axis servo mechanism 2 of the control apparatus 1, which attains a method of correcting the machining errors in the noncircular shape machining apparatus after a conventional method of learning, and FIG. 3 is a flow chart showing an example of the operation thereof. The workpiece 3 is rotated at a desired rotation speed by the spindle motor 5 which is driven by a spindle driving apparatus 4. When the pulse generator 6 detects the rotation of the workpiece 3 as a pulse PS and supplies it to a counter 21, the counter 21 counts the pulse PS and sets it as a rotation angle .theta.. A target position f(.theta.) of the tool 10 or a value close to the target position f(.theta.) is prestored in a command position data memory 25 as a command position c(.theta.), and a command position data reading section 22 reads the command position c(.theta.) which corresponds to the rotation angle .theta. of the workpiece 3 from the counter 21, out of the command position data memory 25, and controls the X-axis servo mechanism 2 in accordance with the command position c(.theta.). A detected-position data writing section 23 writes the position a(.theta.) of the tool 10 detected from an X-axis position detecting device 8 on an amount of one revolution of the workpiece 3, that is, on an extent of .theta.=0.degree. to 360 .degree., into a detected-position data memory 26 (Step S10). The target position f(.theta.) of the tool 10 is prestored in a target position data memory 27, and a command position data correcting section 40 writes a corrected command position cc(.theta.) of which the command position c(.theta.) has been corrected by an equation (1) into the command position data memory 25, on the basis of a difference between the target position f(.theta.) read from the target position data memory 27 and the detected position a(.theta.) read from the detected position data memory 26 (Step S11). EQU cc(.theta.)=c(.theta.)+{f(.theta.+.DELTA..theta.)-a(.theta.+.DELTA..theta.) }(1)
where
cc(.theta.): corrected command position PA1 c(.theta.): command position PA1 f(.theta.): target position PA1 a(.theta.): detected position PA1 .DELTA..theta.: amount of phase shift (constant)
The command position data reading section 22 reads the corrected command position cc(.theta.) corresponding to the rotation angle .theta. of the workpiece 3 which is read from the counter 21, from the command position data memory 25, and controls the X-axis servo mechanism 2 by the corrected command position cc(.theta.). Then, the detected-position data writing section 23 writes the position a(.theta.) detected by the X-axis position detecting device 8 on an amount of one revolution of the workpiece 3, that is, on an extent of .theta.=0.degree. to 360.degree., into the detected-position data memory 26 (Step S12). At the next step, the command position data correcting section 40 judges whether the difference between the detected position a(.theta.) read from the detected position data memory 26 and the target position f(.theta.) read from the target position data memory 27, is larger than a fixed value or not (Step S13), and all operations are complete if the difference is not larger than a predetermined value. Alternatively, if the difference is larger than the predetermined value, the command position data correcting section 40 replaces the command position c(.theta.) with the corrected command position cc(.theta.) (Step S14), then returns to the above Step S11 and repeats the operation described above.
The above-mentioned machining-error correcting method used for the non-circular shape machining apparatus based on a process of learning, has a disadvantage in that it is essentially incapable of correcting errors since such a difference correcting method adds the errors resulting from the fact that an amplification factor of the servo mechanism is not `1`, to the command value, thereby correcting them. Moreover, a relationship between a phase which produces errors and a phase of which command position is corrected on the basis of the errors, is fixed. However, these relationship between these phases may vary with a frequency at which a tool moves forward/backward and some mechanical conditions such as temperature and due to the linearity of the servo mechanism, thus such an error relating to the phase is also a factor which obstructs the divergence of the learning and is a troublesome problem.
On the other hand, another machining-error correcting method used for the non-circular shape machining apparatus, which identifies a characteristic of the servo and corrects a command position by an inverse transfer function, has come into in practical use. However, even the machining-error correcting method correcting by the inverse transfer function needs to effect correction by adding the errors to a command position to perform the machining at a higher speed and with higher accuracy, because of a difference between control models of servo mechanisms and identification errors of control parameters.